{#
Copyright (c) 2020 Andy Zhou
MIT License
#}
{% extends 'base.html' %}
{% from 'macros.html' import user_card with context %}
{% from 'bootstrap/pagination.html' import render_pagination %}
{% block title %}
    {% if user == current_user %} {{ _('Your') }}
    {% else %} {{ _('His or her') }}
    {% endif %} {{ _('followers') }}
{% endblock %}
{% block page_content %}
    <ul class="list-group">
        {% if pagination.items | length > 1 %}
        {% for follow in pagination.items %}
            {% if follow.follower != user %}
                {{ user_card(follow.follower) }}
            {% endif %}
        {% endfor %}
        {% else %}
            <div class="tip">
                {% if user == current_user %}
                    <h3>{{ _('You have no followers') }}</h3>
                {% else %}
                    <h3>{{ _('User %s has no followers' % user.username) }}</h3>
                {% endif %}
            </div>
        {% endif %}
    </ul>
    {% if pagination.items | length != 1 %}
        {{ render_pagination(pagination) }}
    {% endif %}
{% endblock page_content %}